#TradeApi/CMakeLists.txt
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

PROJECT(TradeApi)

#版本号，注意0会导致CONFIGURE_FILE替换@VAR@失败
SET(TRADEAPI_VERSION_MAJOR 1)
SET(TRADEAPI_VERSION_MINOR 1)
SET(TRADEAPI_VERSION_BUILD 1)
SET(TRADEAPI_VERSION "${TRADEAPI_VERSION_MAJOR}.${TRADEAPI_VERSION_MINOR}.${TRADEAPI_VERSION_BUILD}")

CONFIGURE_FILE(./include/version.h.in ${PROJECT_SOURCE_DIR}/include/version.h @ONLY)

ADD_SUBDIRECTORY(TradeApi)

#ELSE(WIN32)之类的语句很容易引起歧义，可以这样消除这个问题
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
